<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino AudioKit HAL: src/AudioKitConfig.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Arduino AudioKit HAL
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">AudioKitConfig.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * @brief AUDIOKIT_BOARD selects a specic board:</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * 1) lyrat_v4_3</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * 2) lyrat_v4_2</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * 3) lyrat_mini_v1_1</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * 4) lyratd_msc_v2_2</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * 5) lyratd_msc_v2_1</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * 6) ai_thinker_es8388_3478</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * 7) esp32_s2_kaluga_1_v1_2</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#define AUDIOKIT_BOARD 1</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#define AUDIOKIT_DEFAULT_INPUT          AUDIO_HAL_ADC_INPUT_LINE1</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#define AUDIOKIT_DEFAULT_OUTPUT         AUDIO_HAL_DAC_OUTPUT_ALL</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#define AUDIOKIT_DEFAULT_MASTER_SLAVE   AUDIO_HAL_MODE_SLAVE</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#define AUDIOKIT_DEFAULT_RATE           AUDIO_HAL_44K_SAMPLES</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#define AUDIOKIT_DEFAULT_BITSIZE        AUDIO_HAL_BIT_LENGTH_16BITS</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#define AUDIOKIT_DEFAULT_I2S_FMT        AUDIO_HAL_I2S_NORMAL</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> * @brief Configuation for AudioKit</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html">   27</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_audio_kit_config.html">AudioKitConfig</a> {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordtype">int</span> i2s_num = 0;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a8ae224cfd264634f4e09e6208cbcf6c0">   30</a></span>&#160;    <a class="code" href="audio__hal_8h.html#a646b0eb34cb010bc893c9df838263803">audio_hal_adc_input_t</a> <a class="code" href="struct_audio_kit_config.html#a8ae224cfd264634f4e09e6208cbcf6c0">adc_input</a>=AUDIOKIT_DEFAULT_INPUT;       <span class="comment">/*!&lt;  set adc channel with audio_hal_adc_input_t */</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a61712923e2b592811a9e97dbbc9cd108">   31</a></span>&#160;    <a class="code" href="audio__hal_8h.html#a317f8679b6dd58c7718254d307ab7ee3">audio_hal_dac_output_t</a> <a class="code" href="struct_audio_kit_config.html#a61712923e2b592811a9e97dbbc9cd108">dac_output</a>=AUDIOKIT_DEFAULT_OUTPUT;     <span class="comment">/*!&lt; set dac channel */</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">   32</a></span>&#160;    <a class="code" href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15">audio_hal_codec_mode_t</a> <a class="code" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a>;   <span class="comment">/*!&lt; select codec mode: adc, dac or both */</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#add6c0604564d301e8582d8fc5a18d815">   33</a></span>&#160;    <a class="code" href="audio__hal_8h.html#a2cb0f5e3b3b526df661edb765ce4e3c1">audio_hal_iface_mode_t</a> <a class="code" href="struct_audio_kit_config.html#add6c0604564d301e8582d8fc5a18d815">master_slave_mode</a>=AUDIOKIT_DEFAULT_MASTER_SLAVE;        <span class="comment">/*!&lt; audio codec chip mode */</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a9c3d9f350c847402b7100662ed0b3fe6">   34</a></span>&#160;    <a class="code" href="audio__hal_8h.html#aa5528ef3dfd90c5216c732b69c936a8d">audio_hal_iface_format_t</a> <a class="code" href="struct_audio_kit_config.html#a9c3d9f350c847402b7100662ed0b3fe6">fmt</a>=AUDIOKIT_DEFAULT_I2S_FMT;       <span class="comment">/*!&lt; I2S interface format */</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a393a54f66142390fe26293eafa546434">   35</a></span>&#160;    <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8a">audio_hal_iface_samples_t</a> <a class="code" href="struct_audio_kit_config.html#a393a54f66142390fe26293eafa546434">samples</a> = AUDIOKIT_DEFAULT_RATE;  <span class="comment">/*!&lt; I2S interface samples per second */</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a3342ffc18b975c3380ea3ccecd6f9b46">   36</a></span>&#160;    <a class="code" href="audio__hal_8h.html#a24dda9ff64235c14cd479049893e675b">audio_hal_iface_bits_t</a> <a class="code" href="struct_audio_kit_config.html#a3342ffc18b975c3380ea3ccecd6f9b46">bits</a> = AUDIOKIT_DEFAULT_BITSIZE;        <span class="comment">/*!&lt; i2s interface number of bits per sample */</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">    /// Returns true if the CODEC is the master</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a73b36d53ff8bc857cd626a6e2091944a">   39</a></span>&#160;<span class="comment"></span>    <span class="keywordtype">bool</span> <a class="code" href="struct_audio_kit_config.html#a73b36d53ff8bc857cd626a6e2091944a">isMaster</a>() {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_audio_kit_config.html#add6c0604564d301e8582d8fc5a18d815">master_slave_mode</a>==<a class="code" href="audio__hal_8h.html#a2cb0f5e3b3b526df661edb765ce4e3c1aa39e8bcff956736e3d4fc2a848b5e40f">AUDIO_HAL_MODE_MASTER</a>;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    }</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">    /// provides the bits per sample</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a3c15d27c3e5d9f8dbb304d21992bbbda">   44</a></span>&#160;<span class="comment"></span>    <span class="keywordtype">int</span> <a class="code" href="struct_audio_kit_config.html#a3c15d27c3e5d9f8dbb304d21992bbbda">bitsPerSample</a>(){</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordflow">switch</span>(<a class="code" href="struct_audio_kit_config.html#a3342ffc18b975c3380ea3ccecd6f9b46">bits</a>){</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a24dda9ff64235c14cd479049893e675ba2cf1749f48761214db79fa53b002ab60">AUDIO_HAL_BIT_LENGTH_16BITS</a>:</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                <span class="keywordflow">return</span> 16;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            <span class="keywordflow">case</span> cAUDIO_HAL_BIT_LENGTH_24BITS:</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                <span class="keywordflow">return</span> 24;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a24dda9ff64235c14cd479049893e675ba7cde39d2f770b993999ec7bd36c55c14">AUDIO_HAL_BIT_LENGTH_32BITS</a>:</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                <span class="keywordflow">return</span> 32;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        }</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    }</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">    /// Provides the sample rate in samples per second</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a529a82292760e9ba5de9af677a805858">   57</a></span>&#160;<span class="comment"></span>    <span class="keywordtype">int</span> <a class="code" href="struct_audio_kit_config.html#a529a82292760e9ba5de9af677a805858">sampleRate</a>() {</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordflow">switch</span>(<a class="code" href="struct_audio_kit_config.html#a393a54f66142390fe26293eafa546434">samples</a>){</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa229f59bb35226074711df6af0f421a7d">AUDIO_HAL_08K_SAMPLES</a>:   <span class="comment">/*!&lt; set to  8k samples per second */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                <span class="keywordflow">return</span> 8000;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa6df48be73f539a68e94883219ff258b9">AUDIO_HAL_11K_SAMPLES</a>:   <span class="comment">/*!&lt; set to 11.025k samples per second */</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                <span class="keywordflow">return</span> 11000;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa2db23e071bc7ac8aa4011bc2ac78ee37">AUDIO_HAL_16K_SAMPLES</a>:   <span class="comment">/*!&lt; set to 16k samples in per second */</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                <span class="keywordflow">return</span> 16000;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa7f32e85c53073c51a51000b7f93775fc">AUDIO_HAL_22K_SAMPLES</a>:   <span class="comment">/*!&lt; set to 22.050k samples per second */</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                <span class="keywordflow">return</span> 22000;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa3d9efd3d744d98297c9fcb37219ef32b">AUDIO_HAL_24K_SAMPLES</a>:   <span class="comment">/*!&lt; set to 24k samples in per second */</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                <span class="keywordflow">return</span> 24000;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa5b44ccf37685d8eddbe235b9f85e2b2b">AUDIO_HAL_32K_SAMPLES</a>:   <span class="comment">/*!&lt; set to 32k samples in per second */</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                <span class="keywordflow">return</span> 32000;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aaf8e5bab026b69818030d88485a9624d1">AUDIO_HAL_44K_SAMPLES</a>:   <span class="comment">/*!&lt; set to 44.1k samples per second */</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                <span class="keywordflow">return</span> 44000;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aafd6f4c13e333a057bed81b8e3ebe0481">AUDIO_HAL_48K_SAMPLES</a>:   <span class="comment">/*!&lt; set to 48k samples per second */</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                <span class="keywordflow">return</span> 48000;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        }</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">    /// Provides the ESP32 i2s_config_t</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="struct_audio_kit_config.html#a9c99eef02d163307ee03575933d8ed63">   80</a></span>&#160;<span class="comment"></span>    i2s_config_t <a class="code" href="struct_audio_kit_config.html#a9c99eef02d163307ee03575933d8ed63">i2sConfig</a>(){</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;         <span class="keywordtype">int</span> mode = <a class="code" href="struct_audio_kit_config.html#a73b36d53ff8bc857cd626a6e2091944a">isMaster</a>()? I2S_MODE_MASTER : I2S_MODE_SLAVE;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;         <span class="keywordflow">if</span> (<a class="code" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a>==<a class="code" href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15ae3393ec7ddddd45580bf951b220eb149">AUDIO_HAL_CODEC_MODE_DECODE</a>){</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;             mode = mode | I2S_MODE_TX;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a>==<a class="code" href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15ac6281bfaf4f20254445d21eaea74c585">AUDIO_HAL_CODEC_MODE_ENCODE</a>)){</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;             mode = mode | I2S_MODE_RX;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> <a class="code" href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">codec_mode</a>==<a class="code" href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15aba33695475b6ea2ded974c0ebfa11ef3">AUDIO_HAL_CODEC_MODE_BOTH</a>)){</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;             mode = mode | I2S_MODE_RX | I2S_MODE_TX;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;         }  </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;         <span class="keyword">const</span> i2s_config_t i2s_config = {</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            .mode = mode,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            .sample_rate = <a class="code" href="struct_audio_kit_config.html#a529a82292760e9ba5de9af677a805858">sampleRate</a>(),</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            .bits_per_sample = <a class="code" href="struct_audio_kit_config.html#a3c15d27c3e5d9f8dbb304d21992bbbda">bitsPerSample</a>(),</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            .communication_format = I2S_COMM_FORMAT_STAND_I2S,</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            .intr_alloc_flags = 0, <span class="comment">// default interrupt priority</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            .dma_buf_count = 8,</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            .dma_buf_len = 64,</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            .use_apll = <span class="keyword">true</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        };</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keywordflow">return</span> i2s_config;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    } </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    i2s_pin_config_t i2sPins(){</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        i2s_pin_config_t result;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    } </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;};</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="ttc" id="aaudio__hal_8h_html_a0365da45a34e750f87edf33378fadb15"><div class="ttname"><a href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15">audio_hal_codec_mode_t</a></div><div class="ttdeci">audio_hal_codec_mode_t</div><div class="ttdoc">Select media hal codec mode.</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00045">audio_hal.h:45</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a0365da45a34e750f87edf33378fadb15aba33695475b6ea2ded974c0ebfa11ef3"><div class="ttname"><a href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15aba33695475b6ea2ded974c0ebfa11ef3">AUDIO_HAL_CODEC_MODE_BOTH</a></div><div class="ttdeci">@ AUDIO_HAL_CODEC_MODE_BOTH</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00048">audio_hal.h:48</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a0365da45a34e750f87edf33378fadb15ac6281bfaf4f20254445d21eaea74c585"><div class="ttname"><a href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15ac6281bfaf4f20254445d21eaea74c585">AUDIO_HAL_CODEC_MODE_ENCODE</a></div><div class="ttdeci">@ AUDIO_HAL_CODEC_MODE_ENCODE</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00046">audio_hal.h:46</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a0365da45a34e750f87edf33378fadb15ae3393ec7ddddd45580bf951b220eb149"><div class="ttname"><a href="audio__hal_8h.html#a0365da45a34e750f87edf33378fadb15ae3393ec7ddddd45580bf951b220eb149">AUDIO_HAL_CODEC_MODE_DECODE</a></div><div class="ttdeci">@ AUDIO_HAL_CODEC_MODE_DECODE</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00047">audio_hal.h:47</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a24dda9ff64235c14cd479049893e675b"><div class="ttname"><a href="audio__hal_8h.html#a24dda9ff64235c14cd479049893e675b">audio_hal_iface_bits_t</a></div><div class="ttdeci">audio_hal_iface_bits_t</div><div class="ttdoc">Select I2S interface number of bits per sample.</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00104">audio_hal.h:104</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a24dda9ff64235c14cd479049893e675ba2cf1749f48761214db79fa53b002ab60"><div class="ttname"><a href="audio__hal_8h.html#a24dda9ff64235c14cd479049893e675ba2cf1749f48761214db79fa53b002ab60">AUDIO_HAL_BIT_LENGTH_16BITS</a></div><div class="ttdeci">@ AUDIO_HAL_BIT_LENGTH_16BITS</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00105">audio_hal.h:105</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a24dda9ff64235c14cd479049893e675ba7cde39d2f770b993999ec7bd36c55c14"><div class="ttname"><a href="audio__hal_8h.html#a24dda9ff64235c14cd479049893e675ba7cde39d2f770b993999ec7bd36c55c14">AUDIO_HAL_BIT_LENGTH_32BITS</a></div><div class="ttdeci">@ AUDIO_HAL_BIT_LENGTH_32BITS</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00107">audio_hal.h:107</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a2cb0f5e3b3b526df661edb765ce4e3c1"><div class="ttname"><a href="audio__hal_8h.html#a2cb0f5e3b3b526df661edb765ce4e3c1">audio_hal_iface_mode_t</a></div><div class="ttdeci">audio_hal_iface_mode_t</div><div class="ttdoc">Select I2S interface operating mode i.e. master or slave for audio codec chip.</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00082">audio_hal.h:82</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a2cb0f5e3b3b526df661edb765ce4e3c1aa39e8bcff956736e3d4fc2a848b5e40f"><div class="ttname"><a href="audio__hal_8h.html#a2cb0f5e3b3b526df661edb765ce4e3c1aa39e8bcff956736e3d4fc2a848b5e40f">AUDIO_HAL_MODE_MASTER</a></div><div class="ttdeci">@ AUDIO_HAL_MODE_MASTER</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00084">audio_hal.h:84</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a317f8679b6dd58c7718254d307ab7ee3"><div class="ttname"><a href="audio__hal_8h.html#a317f8679b6dd58c7718254d307ab7ee3">audio_hal_dac_output_t</a></div><div class="ttdeci">audio_hal_dac_output_t</div><div class="ttdoc">Select channel for dac output.</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00065">audio_hal.h:65</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a646b0eb34cb010bc893c9df838263803"><div class="ttname"><a href="audio__hal_8h.html#a646b0eb34cb010bc893c9df838263803">audio_hal_adc_input_t</a></div><div class="ttdeci">audio_hal_adc_input_t</div><div class="ttdoc">Select adc channel for input mic signal.</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00055">audio_hal.h:55</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8a"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8a">audio_hal_iface_samples_t</a></div><div class="ttdeci">audio_hal_iface_samples_t</div><div class="ttdoc">Select I2S interface samples per second.</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00090">audio_hal.h:90</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa229f59bb35226074711df6af0f421a7d"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa229f59bb35226074711df6af0f421a7d">AUDIO_HAL_08K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_08K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00091">audio_hal.h:91</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa2db23e071bc7ac8aa4011bc2ac78ee37"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa2db23e071bc7ac8aa4011bc2ac78ee37">AUDIO_HAL_16K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_16K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00093">audio_hal.h:93</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa3d9efd3d744d98297c9fcb37219ef32b"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa3d9efd3d744d98297c9fcb37219ef32b">AUDIO_HAL_24K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_24K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00095">audio_hal.h:95</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa5b44ccf37685d8eddbe235b9f85e2b2b"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa5b44ccf37685d8eddbe235b9f85e2b2b">AUDIO_HAL_32K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_32K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00096">audio_hal.h:96</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa6df48be73f539a68e94883219ff258b9"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa6df48be73f539a68e94883219ff258b9">AUDIO_HAL_11K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_11K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00092">audio_hal.h:92</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa7f32e85c53073c51a51000b7f93775fc"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aa7f32e85c53073c51a51000b7f93775fc">AUDIO_HAL_22K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_22K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00094">audio_hal.h:94</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aaf8e5bab026b69818030d88485a9624d1"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aaf8e5bab026b69818030d88485a9624d1">AUDIO_HAL_44K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_44K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00097">audio_hal.h:97</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_a8f3fc5b0a48e5469ac62f4b1ffa0dc8aafd6f4c13e333a057bed81b8e3ebe0481"><div class="ttname"><a href="audio__hal_8h.html#a8f3fc5b0a48e5469ac62f4b1ffa0dc8aafd6f4c13e333a057bed81b8e3ebe0481">AUDIO_HAL_48K_SAMPLES</a></div><div class="ttdeci">@ AUDIO_HAL_48K_SAMPLES</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00098">audio_hal.h:98</a></div></div>
<div class="ttc" id="aaudio__hal_8h_html_aa5528ef3dfd90c5216c732b69c936a8d"><div class="ttname"><a href="audio__hal_8h.html#aa5528ef3dfd90c5216c732b69c936a8d">audio_hal_iface_format_t</a></div><div class="ttdeci">audio_hal_iface_format_t</div><div class="ttdoc">Select I2S interface format for audio codec chip.</div><div class="ttdef"><b>Definition:</b> <a href="audio__hal_8h_source.html#l00113">audio_hal.h:113</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html"><div class="ttname"><a href="struct_audio_kit_config.html">AudioKitConfig</a></div><div class="ttdoc">Configuation for AudioKit.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00027">AudioKitConfig.h:27</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a3342ffc18b975c3380ea3ccecd6f9b46"><div class="ttname"><a href="struct_audio_kit_config.html#a3342ffc18b975c3380ea3ccecd6f9b46">AudioKitConfig::bits</a></div><div class="ttdeci">audio_hal_iface_bits_t bits</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00036">AudioKitConfig.h:36</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a393a54f66142390fe26293eafa546434"><div class="ttname"><a href="struct_audio_kit_config.html#a393a54f66142390fe26293eafa546434">AudioKitConfig::samples</a></div><div class="ttdeci">audio_hal_iface_samples_t samples</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00035">AudioKitConfig.h:35</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a3c15d27c3e5d9f8dbb304d21992bbbda"><div class="ttname"><a href="struct_audio_kit_config.html#a3c15d27c3e5d9f8dbb304d21992bbbda">AudioKitConfig::bitsPerSample</a></div><div class="ttdeci">int bitsPerSample()</div><div class="ttdoc">provides the bits per sample</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00044">AudioKitConfig.h:44</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a529a82292760e9ba5de9af677a805858"><div class="ttname"><a href="struct_audio_kit_config.html#a529a82292760e9ba5de9af677a805858">AudioKitConfig::sampleRate</a></div><div class="ttdeci">int sampleRate()</div><div class="ttdoc">Provides the sample rate in samples per second.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00057">AudioKitConfig.h:57</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a61712923e2b592811a9e97dbbc9cd108"><div class="ttname"><a href="struct_audio_kit_config.html#a61712923e2b592811a9e97dbbc9cd108">AudioKitConfig::dac_output</a></div><div class="ttdeci">audio_hal_dac_output_t dac_output</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00031">AudioKitConfig.h:31</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a73b36d53ff8bc857cd626a6e2091944a"><div class="ttname"><a href="struct_audio_kit_config.html#a73b36d53ff8bc857cd626a6e2091944a">AudioKitConfig::isMaster</a></div><div class="ttdeci">bool isMaster()</div><div class="ttdoc">Returns true if the CODEC is the master.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00039">AudioKitConfig.h:39</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a8ae224cfd264634f4e09e6208cbcf6c0"><div class="ttname"><a href="struct_audio_kit_config.html#a8ae224cfd264634f4e09e6208cbcf6c0">AudioKitConfig::adc_input</a></div><div class="ttdeci">audio_hal_adc_input_t adc_input</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00030">AudioKitConfig.h:30</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a9c3d9f350c847402b7100662ed0b3fe6"><div class="ttname"><a href="struct_audio_kit_config.html#a9c3d9f350c847402b7100662ed0b3fe6">AudioKitConfig::fmt</a></div><div class="ttdeci">audio_hal_iface_format_t fmt</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00034">AudioKitConfig.h:34</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_a9c99eef02d163307ee03575933d8ed63"><div class="ttname"><a href="struct_audio_kit_config.html#a9c99eef02d163307ee03575933d8ed63">AudioKitConfig::i2sConfig</a></div><div class="ttdeci">i2s_config_t i2sConfig()</div><div class="ttdoc">Provides the ESP32 i2s_config_t.</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00080">AudioKitConfig.h:80</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_add6c0604564d301e8582d8fc5a18d815"><div class="ttname"><a href="struct_audio_kit_config.html#add6c0604564d301e8582d8fc5a18d815">AudioKitConfig::master_slave_mode</a></div><div class="ttdeci">audio_hal_iface_mode_t master_slave_mode</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00033">AudioKitConfig.h:33</a></div></div>
<div class="ttc" id="astruct_audio_kit_config_html_ae4d2ebbeffb709eda313ff5dffdbb2ab"><div class="ttname"><a href="struct_audio_kit_config.html#ae4d2ebbeffb709eda313ff5dffdbb2ab">AudioKitConfig::codec_mode</a></div><div class="ttdeci">audio_hal_codec_mode_t codec_mode</div><div class="ttdef"><b>Definition:</b> <a href="_audio_kit_config_8h_source.html#l00032">AudioKitConfig.h:32</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
